---
sidebar_label: Debugging
sidebar_position: 10
description: Debugging Hasura Actions
keywords:
  - hasura
  - docs
  - actions
  - debug
  - debugging
---

import GraphiQLIDE from '@site/src/components/GraphiQLIDE';

# Debugging Actions

## Introduction

While you're developing Actions for your application, to debug faster
you may want to see the exact details of the webhook call for the Action
as well.

To do so, start the server in [debugging mode](/deployment/graphql-engine-flags/config-examples.mdx#dev-mode). In the case
of errors, the GraphQL response will contain debugging information of
the webhook calls in the `extensions.internal` field.

If you are using action transforms, then you will also see the
`transformed_request` inside the `request` field.

**For example**:

<GraphiQLIDE
  query={`mutation {
  create_user(email: "foo@bar.com", name: "Foo"){
    id
    user {
      name
      email
    }
  }
}`}
  response={`{
  "errors": [
    {
      "message": "got scalar String for the action webhook response, expecting UserId",
      "extensions": {
        "code": "unexpected",
        "path": "$",
        "internal": {
          "error": "got scalar String for the action webhook response, expecting UserId",
          "response": {
            "status": 200,
            "headers": [
              {
                "value": "application/json",
                "name": "Content-Type"
              }
            ],
            "body": "[incorrect response]"
          },
          "request": {
            "url": "http://127.0.0.1:5593/scalar-response",
            "headers": [],
            "body": {
              "action": {
                "name": "create_user"
              },
              "session_variables": {
                "x-hasura-role": "admin"
              },
              "input": {
                "email": "foo@boo.com",
                "name": "Foo"
              },
              "request_query": "mutation {\\n    create_user(email: \\"foo@bar.com\\", name: \\"Foo\\"){\\n id\\n user {\\n name\\n email\\n }\\n }\\n }\\n"
            },
            "transformed_request": {
              "query_string": "",
              "body": "[transformed body]",
              "url": "http://127.0.0.1:3000/abcd",
              "headers": [
                [
                  "Content-Type",
                  "application/json"
                ]
              ],
              "method": "PATCH",
              "response_timeout": "30000000"
            },
          }
        }
      }
    }
  ]
}
`}
/>

:::info Additional Resources

Introduction to Hasura Actions - [View
Recording](https://hasura.io/events/webinar/hasura-actions/?pg=docs&plcmt=body&cta=view-recording&tech=).

:::
